package com.yanqu.road.entity.monopolymarket.fortress;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.union.UnionBaseInfo;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description 参赛联盟的信息
 * @Author cwq
 * @Data 2021/10/14 11:12
 */
@FieldTypeAnnotation(tableName = "t_c_monopolymarket_fortress_union")
public class MonopolyMarketFortressUnionData extends DataObject {
    @FieldTypeAnnotation(select = true, update = true, desc = "分组id")
    private long groupId;
    @FieldTypeAnnotation(select = true, update = true, desc = "周id，例如 每周一的时间 20211011")
    private int weekId;
    @FieldTypeAnnotation(select = true, update = true, desc = "联盟id")
    private String unionId;
    @FieldTypeAnnotation(desc = "联盟信息 ")
    private UnionBaseInfo unionBaseInfo;
    @FieldTypeAnnotation(desc = "联盟成员id （结算期 、采集期期才有值）")
    private List<Long> memberIdList = new ArrayList<>();


    @FieldTypeAnnotation(desc = "是否解散")
    private boolean isDelete;

    public long getGroupId() {
        return groupId;
    }
    public void setGroupId(long groupId) {
        if (this.groupId != groupId) {
            this.groupId = groupId;
            setOp(DataStatus.Update);
        }
    }

    public int getWeekId() {
        return weekId;
    }
    public void setWeekId(int weekId) {
        if (this.weekId != weekId) {
            this.weekId = weekId;
            setOp(DataStatus.Update);
        }
    }

    public String getUnionId() {
        return unionId;
    }
    public void setUnionId(String unionId) {
        if (unionId == null){
            return;
        }
        if (this.unionId == null || !this.unionId.equals(unionId)) {
            this.unionId = unionId;
            setOp(DataStatus.Update);
        }
    }

    public UnionBaseInfo getUnionBaseInfo() {
        return unionBaseInfo;
    }
    public void setUnionBaseInfo(UnionBaseInfo unionBaseInfo) {
        if (null == unionBaseInfo){
            return;
        }
        if (this.unionBaseInfo == null || !this.unionBaseInfo.equals(unionBaseInfo)) {
            this.unionBaseInfo = unionBaseInfo;
            setOp(DataStatus.Update);
        }
    }

    public java.util.List<java.lang.Long> getMemberIdList() {
        return memberIdList;
    }
    public void setMemberIdList(List<Long> memberIdList) {
        if (null == memberIdList){
            return;
        }
        if (this.memberIdList == null || !this.memberIdList.equals(memberIdList)) {
            this.memberIdList = memberIdList;
            setOp(DataStatus.Update);
        }
    }

    public boolean getIsDelete() {
        return isDelete;
    }
    public void setIsDelete(boolean isDelete) {
        if (this.isDelete != isDelete) {
            this.isDelete = isDelete;
            setOp(DataStatus.Update);
        }
    }
}
